<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>莫愁杂志社电商平台.登录</title>
<link rel="icon" href="include/images/icss.ico" type="image/x-icon" />
<link rel="shortcut icon" href="include/images/icss.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="<%=path %>/include/drag/css/drag.css" />
<link rel="stylesheet" type="text/css" href="<%=path %>/include/css/login_icss.css" />
<script type="text/javascript" src="<%=path %>/include/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/include/drag/js/drag.js"></script>
<style type="text/css">
body{background:transparent;}
.login-left-img{width:602px;height:453px;overflow:hidden;}
.login-left-img a{display:block;}

</style>
<script type="text/javascript">
jQuery(document).ready(function() {
	var userCode = $("#userCode");
	var pwd = $("#password");
	var validkey = $("#validkey");
	var userCodeLabel = $("#userCode ~ label");
	var passwordLabel = $("#password ~ label");
	var validkeyLabel = $("#validkey ~ label");
	
	$("#userCode,userCode ~ label").bind("focus",function(){
		if(userCode.val()==""){
			userCodeLabel.fadeOut("fast");
		}
		userCode.parent().parent().attr("class","item-vip-txt userHover");
	});
	$("#userCode,userCode ~ label").bind("blur",function(){
		if(userCode.val()==""){
			userCodeLabel.fadeIn("fast");
		}
		userCode.parent().parent().attr("class","item-vip-txt");
	});
	$("#password,password ~ label").bind("focus",function(){
		if(pwd.val()==""){
			passwordLabel.fadeOut("fast");
		}
		pwd.parent().parent().attr("class","item-vip-txt userHover");
	});
	$("#password,password ~ label").bind("blur",function(){
		if(pwd.val()==""){
			passwordLabel.fadeIn("fast");
		}
		pwd.parent().parent().attr("class","item-vip-txt");
	});
	$("#validkey").bind("focus",function(){
		if(validkey.val()==""){
			validkeyLabel.fadeOut("fast");
		}
	});
	$("#validkey").bind("blur",function(){
		if(validkey.val()==""){
			validkeyLabel.fadeIn("fast");
		}
	});
	
});
</script>
</head>

 <body>
  <!--头部分-->
  <div class="Login_hd">
	<h1 style="padding-left:10px;"><a href="javascript:void('');" target="_blank" style="background:url('<%=path %>/include/images/logo/logoB.png') no-repeat 0 0;"></a></h1>
	<div class="hotline" style="display:none;">
		<p class="line1">客服热线&nbsp;&nbsp;400-6360-888</p>
    	<p>工作时间&nbsp;8:30-18:00</p>
	</div>
 </div>
<!--登录部分-->
 <div class="ConTent">

	<div class="login">
	
		<div class="LoginImg">
			<div class="login-ban-max" style="display:block:">
				<div class="login-left-img"><a href="javascript:void('');" target="_blank"><img src="<%=path %>/include/images/loginImg/login_img.png" rel="adimg" alt="" data-useractivelogs="UserBehavior_sso_ad"/></a></div>
			</div>
		</div>
		<div class="LoginBox">	
			<div class="vip-login-cont">
				<div class="ture-line-login" style="display:block;">
					<div class="vip-login-t">
						<h2>请输入账号</h2><i></i>
						<!-- 
						<a href="<%=path %>/pages/login/register.jsp" target="_self" >免费注册</a>
						 -->
					</div>
					<input type="hidden" id="stopTimer" value="" />
					
					<form id="loginForm" name="loginForm" method="post" style="width:96%;">
					
						<input type="hidden" name="Passwd" id="Passwd" value="" />
							        	
			
						<div class="item-vip-txt ">
							<div class="vip-login-inptxt">
								<input type="text" name="userCode" id="userCode" value="" placeholder="用户名"  onchange="_hideNoneTip();"  tabindex="1"/>
								<s title="用户名"></s>
							</div>
							<div class="entry-hint">
								<div class="icon-c" style="display:none;" id="none_tip">
									<p></p><span>该登录账号不存在</span>
								</div>
							
								<a id="timeDown" href="#" class="forget-userName" style="display:none;width:118px;">90秒后重试</a>
								<a id="forgetUname" href="javascript:void('');" target="_blank" class="forget-userName" style="display:none;">忘记用户名？</a>
								<a id="mpCode" href="#" onclick="javascript:sendTemp('');" class="forget-userName" style="display:none; color: #039;">发送动态口令</a>
								<input type="hidden" id="ajaxLock"/><input type="hidden" id="regType" name="regType" /><input type="hidden" id="validateLogin" name="validateLogin" />
							</div>
						</div>
						<div class="item-vip-txt ">
							<div class="User-passWord" >
								<input style="display:block;" type="password" id="password" placeholder="密码" onchange="_hideErrorTip();"  tabindex="2"/>
								<s title="密码"></s>
 								<div id="newPassDiv"></div>
							</div>
							<div class="entry-hint">
								<div id="error_pwd_tip" class="icon-c" style="display:none;"><p></p><span>登录账号或密码错误</span></div>
								<!-- 
								<a href="<%=path %>/pages/login/resetPwd.jsp"  target="_blank" class="forget-passWord"  >忘记密码？</a>
								 -->
							</div>
						</div>
						
			 	   	<input type="hidden" name="aToken" value=""/>
			 	  	
					<div class="safe-login" style="display:none;">
						<label for="securitybox"><input id="securitybox" name="securitybox" type="checkbox" onclick="doClickCheck()" tabindex="4"/>安全控件登录</label>
					</div>
					<div class="mkeContentBox">
						<div id="drag">
							<div class="drag_bg"></div>
							<div class="drag_text" onselectstart="return false;" unselectable="on">拖动滑块验证</div>
							<div class="handler handler_bg"></div>
						</div>
					</div>
					<!-- 
					<div class="item-vip-txt ">
						<div><img src = "<%=path %>/verifyCode/refresh.do?widthP=80&heightP=40" style="width:80px;height:40px;" onclick="_refresh(this);"/>
						</div>
					</div>
					 -->
					 <br/>
					<div class="btm_submit">
						<button id="formsub" type="button" onclick="return doIMLogin();"  tabindex="5">登&nbsp;&nbsp;&nbsp;录</button>
					</div>
					
					<input type="hidden" name="logincode" id="logincode" value="" />
			        <input type="hidden" name="loginparam" id="loginparam" value="" />
					<input type="hidden" name="shopmanage" value="" />
		        	</form>
				</div><!--ture-line-login end-->
			</div><!--vip-login-cont end-->
		</div><!--LoginBox end-->
	</div><!--login end-->
</div><!--新版登录页面 End -->
<!--  footer begin -->
<!-- 
<div class="footer">
	<iframe src="<%=path %>/pages/html/main/mainFootImg.html" style="height:100px;width:755px;margin: 0 0 0 0px;overflow: hidden;" frameborder="0" scrolling="no"></iframe>
	<iframe width="100%" height="100" frameborder="0" src="<%=path %>/pages/html/main/mainFoot.html" scrolling="no"></iframe>
</div>
 -->
<!--  footer end -->
 </body>
 <script type="text/javascript">
 $(document).ready(function(){
	$("#drag").drag();
 });
 function doIMLogin(){
 	var userCode = $("#userCode").val();
 	var password = $("#password").val();
 	if(userCode == ""){
 		$("#userCode ~ label").css("color","red");
 		$("#userCode ~ label").html("请输入用户名/邮箱/手机号");
 		return false;
 	}
 	if(password == ""){
 		$("#password ~ label").css("color","red");
 		$("#password ~ label").html("请输入密码");
 		return false;
 	}
 	var checkClass = $(".handler").hasClass("handler_ok_bg");
 	if(!checkClass){
 		$("#drag .drag_text").css("color","red");
 		return false;
 	}
 	$.ajax({
 		type:"GET",
		url:"<%=path%>/login/checkLoginInfo.do",
		data: {userCode:userCode,password:password},
		dataType:"json",
		async : false, //同步执行
		success:function(data){
			if(data.success){
				document.location.href="<%=path%>/login.do";
			} else {
				if(data.msg=="no_user"){
					$("#none_tip").show();
				} else if(data.msg=="error_pass"){
					$("#error_pwd_tip").show();
				} else {
					alert(data.msg);
				}
			}
		},error:function(data){
		}
 	});
 }
 //隐藏错误提示
 function _hideErrorTip(){
 	$("#error_pwd_tip").hide();
 }
 function _hideNoneTip(){
 	$("#none_tip").hide();
 }
 function _refresh(obj){
 	obj.src = "<%=path %>/verifyCode/refresh.do?widthP=80&heightP=40&t="+Math.random();
 }
 </script>
</html>
